package jnpf.message;

import jnpf.message.entity.MessageTemplateConfigEntity;
import jnpf.message.entity.SendMessageConfigEntity;
import jnpf.message.fallback.MessageTemplateConfigApiFallback;
import jnpf.utils.FeignName;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 调用发送配置Api
 *
 * @author JNPF开发平台组
 * @version V3.1.0
 * @copyright 引迈信息技术有限公司（https://www.jnpfsoft.com）
 * @date 2021-03-24
 */
@FeignClient(name = FeignName.MESSAGE_SERVER_NAME, fallback = MessageTemplateConfigApiFallback.class,path = "/MessageTemplateConfig")
public interface MessageTemplateConfigApi {

    /**
     * 根据encode获取消息模板
     * @param enCode
     * @return
     */
    @GetMapping("/getInfoByEnCode")
    MessageTemplateConfigEntity getInfoByEnCode(@RequestParam("enCode") String enCode );

    /**
     * 根据encode获取消息模板
     * @return
     */
    @GetMapping("/getSendMessageConfig/{id}")
    SendMessageConfigEntity getSendMessageConfig(@RequestParam("id") String id );

}
